﻿using ShanNiang.Hosting.Common;
using ShanNiang.Service.PackingModels.Requests;
using ShanNiang.Service.PackingModels.Responses;
using ShanNiang.Service.PackingModes.Responses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.Interfaces
{
    /// <summary>
    /// 雪克码请求
    /// </summary>
    public interface IXkmService
    {
        /// <summary>
        /// 获取箱码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<BoxCodeResponse?> GetBoxCodeAsync(GetBoxCodeRequest request);
        /// <summary>
        /// 获取商品
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        Task<ItemResponse?> GetItemAsync(GetItemRequest request);
        /// <summary>
        /// 获取分页商品
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResponse<ItemResponse>?> GetItemsPageAsync(GetItemsPageRequest request);
        /// <summary>
        /// 获取分页箱码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResponse<BoxCodeResponse>?> GetPackingBoxesPageAsync(GetPackingBoxesPageRequest request);
        /// <summary>
        /// 获取装箱记录里的商品
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<ItemResponse>?> GetPackingItemsAsync(GetPackingItemsRequest request);
        /// <summary>
        /// 获取装箱记录
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResponse<PackingRecordResponse>?> GetPackingRecordsPageAsync(GetPackingRecordsPageRequest request);
        /// <summary>
        /// 获取装箱记录里的装箱人
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<PackingUserResponse>?> GetPackingUsersRequestAsync(GetPackingUsersRequest request);
        /// <summary>
        /// 获取托盘数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PalletResponse?> GetPalletAsync(GetPalletRequest request);
        /// <summary>
        /// 获取分页已装的托
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResponse<PalletDetailResponse>?> GetPalletsPageAsync(GetPalletsPageRequest request);
        /// <summary>
        /// 获取托盘详细数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PalletDetailResponse?> GetPalletDetailAsync(GetPalletDetailRequest request);
        /// <summary>
        /// 获取用户工作摘要
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<UserWorkSummaryResponse?> GetUserWorkSummaryAsync(GetUserWorkSummaryRequest request);
        /// <summary>
        /// 注册或登陆
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<UserResponse?> LogionOrRegistAsync(LoginOrRegistRequest request);
        /// <summary>
        /// 封箱
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<int> PackUpBoxAsync(PackUpBoxRequest request);
        /// <summary>
        /// 刷新箱码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<Dictionary<string,BoxCodeCountResponse>?> RefreshBoxCodesAsync(RefreshBoxCodesRequest request);
        /// <summary>
        /// 装托
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<ApiCodeResponse>?> SavePalletAsync(SavePalletRequest request);
        /// <summary>
        /// 拆箱
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<ApiCodeResponse>?> UnpackBoxesAsync(UnpackBoxesRequest request);
        /// <summary>
        /// 拆托
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<object?> UnpackPalletAsync(UnpackPalletRequest request);
    }
}
